home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / filutil / flex247x.zip / FLEX247 / BCCDIFFS next >
Text File  |  1994-09-28  |  6KB  |  229 lines

  1. --- misc.c    Tue Jan 04 14:33:10 1994
  2. +++ ../misc.c    Wed Sep 28 18:44:32 1994
  3. @@ -55,15 +55,19 @@
  4.      action_index += len;
  5.      }
  6.  
  7.  
  8.  /* allocate_array - allocate memory for an integer array of the given size */
  9.  
  10.  void *allocate_array( size, element_size )
  11. +#ifndef __BORLANDC__
  12.  int size, element_size;
  13. +#else /* __BORLANDC__ */
  14. +size_t size, element_size;
  15. +#endif /* __BORLANDC__ */
  16.      {
  17.      register void *mem;
  18.  
  19.      /* On 16-bit int machines (e.g., 80286) we might be trying to
  20.       * allocate more than a signed int can hold, and that won't
  21.       * work.  Cheap test:
  22.       */
  23. @@ -634,15 +638,19 @@
  24.      }
  25.  
  26.  
  27.  /* reallocate_array - increase the size of a dynamic array */
  28.  
  29.  void *reallocate_array( array, size, element_size )
  30.  void *array;
  31. +#ifndef __BORLANDC__
  32.  int size, element_size;
  33. +#else /* __BORLANDC__ */
  34. +size_t size, element_size;
  35. +#endif /* __BORLANDC__ */
  36.      {
  37.      register void *new_array;
  38.  
  39.      /* Same worry as in allocate_array(): */
  40.      if ( size * element_size <= 0 )
  41.          flexfatal(
  42.              "attempt to increase array size by less than 1 byte" );
  43. @@ -739,15 +747,19 @@
  44.      }
  45.  
  46.  
  47.  /* The following is only needed when building flex's parser using certain
  48.   * broken versions of bison.
  49.   */
  50.  void *yy_flex_xmalloc( size )
  51. +#ifndef __BORLANDC__
  52.  int size;
  53. +#else /* __BORLANDC__ */
  54. +size_t size;
  55. +#endif /* __BORLANDC__ */
  56.      {
  57.      void *result = flex_alloc( size );
  58.  
  59.      if ( ! result  )
  60.          flexfatal( "memory allocation failed in yy_flex_xmalloc()" );
  61.  
  62.      return result;
  63. --- skel.c    Wed Aug 03 11:38:32 1994
  64. +++ ../skel.c    Wed Sep 28 18:50:58 1994
  65. @@ -26,15 +26,19 @@
  66.    "",
  67.    "#ifdef __cplusplus",
  68.    "",
  69.    "#include <stdlib.h>",
  70.    "%+",
  71.    "class istream;",
  72.    "%*",
  73. +  "#ifndef __BORLANDC__",
  74.    "#include <unistd.h>",
  75. +  "#else /* __BORLANDC__ */",
  76. +  "#include <io.h>",
  77. +  "#endif /* __BORLANDC__ */",
  78.    "",
  79.    "/* Use prototypes in function declarations. */",
  80.    "#define YY_USE_PROTOS",
  81.    "",
  82.    "/* The \"const\" storage-class-modifier is valid. */",
  83.    "#define YY_USE_CONST",
  84.    "",
  85. @@ -240,16 +244,21 @@
  86.    "static int yy_start_stack_depth = 0;",
  87.    "static int *yy_start_stack = 0;",
  88.    "static void yy_push_state YY_PROTO(( int new_state ));",
  89.    "static void yy_pop_state YY_PROTO(( void ));",
  90.    "static int yy_top_state YY_PROTO(( void ));",
  91.    "%*",
  92.    "",
  93. +  "#ifndef __BORLANDC__",
  94.    "static void *yy_flex_alloc YY_PROTO(( unsigned int ));",
  95.    "static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));",
  96. +  "#else /* __BORLANDC__ */",
  97. +  "static void *yy_flex_alloc YY_PROTO(( size_t ));",
  98. +  "static void *yy_flex_realloc YY_PROTO(( void *, size_t ));",
  99. +  "#endif /* __BORLANDC__ */",
  100.    "static void yy_flex_free YY_PROTO(( void * ));",
  101.    "",
  102.    "#define yy_new_buffer yy_create_buffer",
  103.    "",
  104.    "%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here",
  105.    "",
  106.    "#ifndef yytext_ptr",
  107. --- initscan.c    Wed Aug 03 11:42:46 1994
  108. +++ ../initscan.c    Wed Sep 28 18:51:34 1994
  109. @@ -16,15 +16,19 @@
  110.  #endif
  111.  #endif
  112.  
  113.  
  114.  #ifdef __cplusplus
  115.  
  116.  #include <stdlib.h>
  117. +#ifndef __BORLANDC__
  118.  #include <unistd.h>
  119. +#else /* __BORLANDC__ */
  120. +#include <io.h>
  121. +#endif /* __BORLANDC__ */
  122.  
  123.  /* Use prototypes in function declarations. */
  124.  #define YY_USE_PROTOS
  125.  
  126.  /* The "const" storage-class-modifier is valid. */
  127.  #define YY_USE_CONST
  128.  
  129. @@ -220,16 +224,21 @@
  130.  static int yy_start_stack_ptr = 0;
  131.  static int yy_start_stack_depth = 0;
  132.  static int *yy_start_stack = 0;
  133.  static void yy_push_state YY_PROTO(( int new_state ));
  134.  static void yy_pop_state YY_PROTO(( void ));
  135.  static int yy_top_state YY_PROTO(( void ));
  136.  
  137. +#ifndef __BORLANDC__
  138.  static void *yy_flex_alloc YY_PROTO(( unsigned int ));
  139.  static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
  140. +#else /* __BORLANDC__ */
  141. +static void *yy_flex_alloc YY_PROTO(( size_t ));
  142. +static void *yy_flex_realloc YY_PROTO(( void *, size_t ));
  143. +#endif /* __BORLANDC__ */
  144.  static void yy_flex_free YY_PROTO(( void * ));
  145.  
  146.  #define yy_new_buffer yy_create_buffer
  147.  
  148.  #define INITIAL 0
  149.  #define SECT2 1
  150.  #define SECT2PROLOG 2
  151. --- flexdef.h    Tue Jan 04 14:33:14 1994
  152. +++ ../flexdef.h    Wed Sep 28 18:53:44 1994
  153. @@ -27,14 +27,25 @@
  154.   */
  155.  
  156.  /* @(#) $Header: flexdef.h,v 1.2 94/01/04 14:33:14 vern Exp $ (LBL) */
  157.  
  158.  #include <stdio.h>
  159.  #include <ctype.h>
  160.  
  161. +#ifdef __BORLANDC__
  162. +#include <malloc.h>
  163. +
  164. +#pragma warn -pro
  165. +#pragma warn -rch
  166. +#pragma warn -use
  167. +#pragma warn -aus
  168. +#pragma warn -par
  169. +#pragma warn -pia
  170. +
  171. +#endif /* __BORLANDC__ */
  172.  #if HAVE_STRING_H
  173.  #include <string.h>
  174.  #else
  175.  #include <strings.h>
  176.  #endif
  177.  
  178.  #if __STDC__
  179. @@ -607,19 +618,29 @@
  180.   */
  181.  
  182.  extern char nmstr[MAXLINE];
  183.  extern int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
  184.  extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
  185.  extern int num_backing_up, bol_needed;
  186.  
  187. +#ifndef __BORLANDC__
  188.  void *allocate_array PROTO((int, int));
  189.  void *reallocate_array PROTO((void*, int, int));
  190. +#else /* __BORLANDC__ */
  191. +void *allocate_array PROTO((size_t, size_t));
  192. +void *reallocate_array PROTO((void*, size_t, size_t));
  193. +#endif /* __BORLANDC__ */
  194.  
  195. +#ifndef __BORLANDC__
  196.  void *flex_alloc PROTO((unsigned int));
  197.  void *flex_realloc PROTO((void*, unsigned int));
  198. +#else /* __BORLANDC__ */
  199. +void *flex_alloc PROTO((size_t));
  200. +void *flex_realloc PROTO((void*, size_t));
  201. +#endif /* __BORLANDC__ */
  202.  void flex_free PROTO((void*));
  203.  
  204.  #define allocate_integer_array(size) \
  205.      (int *) allocate_array( size, sizeof( int ) )
  206.  
  207.  #define reallocate_integer_array(array,size) \
  208.      (int *) reallocate_array( (void *) array, size, sizeof( int ) )
  209. @@ -772,15 +793,19 @@
  210.  /* Write out one section of the skeleton file. */
  211.  extern void skelout PROTO((void));
  212.  
  213.  /* Output a yy_trans_info structure. */
  214.  extern void transition_struct_out PROTO((int, int));
  215.  
  216.  /* Only needed when using certain broken versions of bison to build parse.c. */
  217. +#ifndef __BORLANDC__
  218.  extern void *yy_flex_xmalloc PROTO(( int ));
  219. +#else /* __BORLANDC__ */
  220. +extern void *yy_flex_xmalloc PROTO(( size_t ));
  221. +#endif /* __BORLANDC__ */
  222.  
  223.  /* Set a region of memory to 0. */
  224.  extern void zero_out PROTO((char *, int));
  225.  
  226.  
  227.  /* from file nfa.c */
  228.  
  229.